<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BadgerDB: badgerdb::BadgerDbException Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BadgerDB
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacebadgerdb.html">badgerdb</a></li><li class="navelem"><a class="el" href="classbadgerdb_1_1_badger_db_exception.html">BadgerDbException</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classbadgerdb_1_1_badger_db_exception-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">badgerdb::BadgerDbException Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for all BadgerDB-specific exceptions.  
 <a href="classbadgerdb_1_1_badger_db_exception.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for badgerdb::BadgerDbException:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classbadgerdb_1_1_badger_db_exception.png" usemap="#badgerdb::BadgerDbException_map" alt=""/>
  <map id="badgerdb::BadgerDbException_map" name="badgerdb::BadgerDbException_map">
<area href="classbadgerdb_1_1_bad_buffer_exception.html" title="An exception that is thrown when a buffer is found whose valid is false but other variables in BufDes..." alt="badgerdb::BadBufferException" shape="rect" coords="254,112,498,136"/>
<area href="classbadgerdb_1_1_buffer_exceeded_exception.html" title="An exception that is thrown when buffer capacity is exceeded." alt="badgerdb::BufferExceededException" shape="rect" coords="254,168,498,192"/>
<area href="classbadgerdb_1_1_file_exists_exception.html" title="An exception that is thrown when a file creation is requested for a filename that already exists." alt="badgerdb::FileExistsException" shape="rect" coords="254,224,498,248"/>
<area href="classbadgerdb_1_1_file_not_found_exception.html" title="An exception that is thrown when a file operation is requested for a filename that doesn&#39;t exist." alt="badgerdb::FileNotFoundException" shape="rect" coords="254,280,498,304"/>
<area href="classbadgerdb_1_1_file_open_exception.html" title="An exception that is thrown when a file deletion is requested for a filename that&#39;s currently open." alt="badgerdb::FileOpenException" shape="rect" coords="254,336,498,360"/>
<area href="classbadgerdb_1_1_hash_already_present_exception.html" title="An exception that is thrown when a new entry to be inserted in the hash table is already present in i..." alt="badgerdb::HashAlreadyPresentException" shape="rect" coords="254,392,498,416"/>
<area href="classbadgerdb_1_1_hash_not_found_exception.html" title="An exception that is thrown when an entry being looked up in the hash table is not present in it." alt="badgerdb::HashNotFoundException" shape="rect" coords="254,448,498,472"/>
<area href="classbadgerdb_1_1_hash_table_exception.html" title="An exception that is thrown when some unexpected error occurs in the hash table." alt="badgerdb::HashTableException" shape="rect" coords="254,504,498,528"/>
<area href="classbadgerdb_1_1_insufficient_space_exception.html" title="An exception that is thrown when a record is attempted to be inserted into a page that doesn&#39;t have s..." alt="badgerdb::InsufficientSpaceException" shape="rect" coords="254,560,498,584"/>
<area href="classbadgerdb_1_1_invalid_page_exception.html" title="An exception that is thrown when an attempt is made to access an invalid page in a file." alt="badgerdb::InvalidPageException" shape="rect" coords="254,616,498,640"/>
<area href="classbadgerdb_1_1_invalid_record_exception.html" title="An exception that is thrown when a record is requested from a page that has a bad record ID." alt="badgerdb::InvalidRecordException" shape="rect" coords="254,672,498,696"/>
<area href="classbadgerdb_1_1_invalid_slot_exception.html" title="An exception that is thrown when a slot that doesn&#39;t have data is requested from a page." alt="badgerdb::InvalidSlotException" shape="rect" coords="254,728,498,752"/>
<area href="classbadgerdb_1_1_page_not_pinned_exception.html" title="An exception that is thrown when a page which is expected to be pinned in the buffer pool is found to..." alt="badgerdb::PageNotPinnedException" shape="rect" coords="254,784,498,808"/>
<area href="classbadgerdb_1_1_page_pinned_exception.html" title="An exception that is thrown when a page which is not expected to be pinned in the buffer pool is foun..." alt="badgerdb::PagePinnedException" shape="rect" coords="254,840,498,864"/>
<area href="classbadgerdb_1_1_slot_in_use_exception.html" title="An exception that is thrown when a record is attempted to be inserted into a slot that is already in ..." alt="badgerdb::SlotInUseException" shape="rect" coords="254,896,498,920"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a07fd2bb076246dab5233c3ceebc4d3af"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_badger_db_exception.html#a07fd2bb076246dab5233c3ceebc4d3af">BadgerDbException</a> (const std::string &amp;msg)</td></tr>
<tr class="separator:a07fd2bb076246dab5233c3ceebc4d3af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a683b7f1ba61c04fbe8e67aeb9b54f192"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_badger_db_exception.html#a683b7f1ba61c04fbe8e67aeb9b54f192">~BadgerDbException</a> ()  throw ()</td></tr>
<tr class="separator:a683b7f1ba61c04fbe8e67aeb9b54f192"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6eeb128b1b886ab84f5ba043127dcce1"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_badger_db_exception.html#a6eeb128b1b886ab84f5ba043127dcce1">message</a> () const</td></tr>
<tr class="separator:a6eeb128b1b886ab84f5ba043127dcce1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a496fb41a623c1aad0131a6cd1319d416"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_badger_db_exception.html#a496fb41a623c1aad0131a6cd1319d416">what</a> () const  throw ()</td></tr>
<tr class="separator:a496fb41a623c1aad0131a6cd1319d416"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a4510b66828c819004489218abeb1cf32"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_badger_db_exception.html#a4510b66828c819004489218abeb1cf32">message_</a></td></tr>
<tr class="separator:a4510b66828c819004489218abeb1cf32"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a06e373696437ef57bd3cf12041e0a420"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbadgerdb_1_1_badger_db_exception.html#a06e373696437ef57bd3cf12041e0a420">operator&lt;&lt;</a> (std::ostream &amp;out, const <a class="el" href="classbadgerdb_1_1_badger_db_exception.html">BadgerDbException</a> &amp;exception)</td></tr>
<tr class="separator:a06e373696437ef57bd3cf12041e0a420"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for all BadgerDB-specific exceptions. </p>

<p class="definition">Definition at line <a class="el" href="badgerdb__exception_8h_source.html#l00018">18</a> of file <a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a07fd2bb076246dab5233c3ceebc4d3af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07fd2bb076246dab5233c3ceebc4d3af">&#9670;&nbsp;</a></span>BadgerDbException()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">badgerdb::BadgerDbException::BadgerDbException </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructs a new exception with the given message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>Message with information about the exception. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="badgerdb__exception_8cpp_source.html#l00012">12</a> of file <a class="el" href="badgerdb__exception_8cpp_source.html">badgerdb_exception.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    : <a class="code" href="classbadgerdb_1_1_badger_db_exception.html#a4510b66828c819004489218abeb1cf32">message_</a>(msg) {</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a683b7f1ba61c04fbe8e67aeb9b54f192"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a683b7f1ba61c04fbe8e67aeb9b54f192">&#9670;&nbsp;</a></span>~BadgerDbException()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual badgerdb::BadgerDbException::~BadgerDbException </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
        <tr>
          <td align="right">throw </td><td>(</td><td colspan="2"></td>
        </tr>
        <tr>
          <td align="right"></td><td>)</td><td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destroys the exception. Does nothing special; just included to make the compiler happy. </p>

<p class="definition">Definition at line <a class="el" href="badgerdb__exception_8h_source.html#l00031">31</a> of file <a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6eeb128b1b886ab84f5ba043127dcce1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6eeb128b1b886ab84f5ba043127dcce1">&#9670;&nbsp;</a></span>message()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::string&amp; badgerdb::BadgerDbException::message </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns a message describing the problem that caused this exception.</p>
<dl class="section return"><dt>Returns</dt><dd>Message describing the problem that caused this exception. </dd></dl>

<p class="definition">Definition at line <a class="el" href="badgerdb__exception_8h_source.html#l00038">38</a> of file <a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="classbadgerdb_1_1_badger_db_exception.html#a4510b66828c819004489218abeb1cf32">message_</a>; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a496fb41a623c1aad0131a6cd1319d416"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a496fb41a623c1aad0131a6cd1319d416">&#9670;&nbsp;</a></span>what()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* badgerdb::BadgerDbException::what </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
        <tr>
          <td align="right">throw </td><td>(</td><td colspan="2"></td>
        </tr>
        <tr>
          <td align="right"></td><td>)</td><td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns a description of the exception.</p>
<dl class="section return"><dt>Returns</dt><dd>Description of the exception. </dd></dl>

<p class="definition">Definition at line <a class="el" href="badgerdb__exception_8h_source.html#l00045">45</a> of file <a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="classbadgerdb_1_1_badger_db_exception.html#a4510b66828c819004489218abeb1cf32">message_</a>.c_str(); }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a06e373696437ef57bd3cf12041e0a420"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a06e373696437ef57bd3cf12041e0a420">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classbadgerdb_1_1_badger_db_exception.html">BadgerDbException</a> &amp;&#160;</td>
          <td class="paramname"><em>exception</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Formats this exception for printing on the given stream.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">out</td><td>Stream to print exception to. </td></tr>
    <tr><td class="paramname">exception</td><td>Exception to print. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Stream with exception printed. </dd></dl>

<p class="definition">Definition at line <a class="el" href="badgerdb__exception_8h_source.html#l00054">54</a> of file <a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                                                                      {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    out &lt;&lt; exception.message();</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordflow">return</span> out;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a4510b66828c819004489218abeb1cf32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4510b66828c819004489218abeb1cf32">&#9670;&nbsp;</a></span>message_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string badgerdb::BadgerDbException::message_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Message describing the problem that caused this exception. </p>

<p class="definition">Definition at line <a class="el" href="badgerdb__exception_8h_source.html#l00064">64</a> of file <a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/ubuntu/study/dbmslab/lab2/BufMgr/src/exceptions/<a class="el" href="badgerdb__exception_8h_source.html">badgerdb_exception.h</a></li>
<li>/home/ubuntu/study/dbmslab/lab2/BufMgr/src/exceptions/<a class="el" href="badgerdb__exception_8cpp_source.html">badgerdb_exception.cpp</a></li>
</ul>
</div><!-- contents -->
<div class="ttc" id="aclassbadgerdb_1_1_badger_db_exception_html_a4510b66828c819004489218abeb1cf32"><div class="ttname"><a href="classbadgerdb_1_1_badger_db_exception.html#a4510b66828c819004489218abeb1cf32">badgerdb::BadgerDbException::message_</a></div><div class="ttdeci">std::string message_</div><div class="ttdef"><b>Definition:</b> <a href="badgerdb__exception_8h_source.html#l00064">badgerdb_exception.h:64</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
